def find_landing_spot(matrix):

    def neighbors_sum(matrix: list[list[int]], i: int, j: int) -> int:
        """sum the values of neighbors"""
        neighbors = []
        # left
        if j > 0:
            neighbors.append(matrix[i][j-1])
        # right
        if j < len(matrix[0]) - 1:
            neighbors.append(matrix[i][j+1])
        # top
        if i > 0:
            neighbors.append(matrix[i-1][j])
        # bottom
        if i < len(matrix) - 1:
            neighbors.append(matrix[i+1][j])
        return sum(neighbors)

    landing_spot = []
    
    i = 0
    while i < len(matrix):
        j = 0
        while j < len(matrix[0]):
            if not matrix[i][j]:
                if not landing_spot:
                    landing_spot = [i, j]
                elif neighbors_sum(matrix, i, j) < neighbors_sum(matrix, *landing_spot):
                    landing_spot = [i, j]
            j += 1
        i += 1
    return landing_spot


if __name__ == '__main__':
    print(find_landing_spot([
        [9, 0, 3], 
        [7, 0, 4], 
        [8, 0, 5]
    ]))